package com.hysf.project1;

import org.springframework.jdbc.core.RowMapper;
import java.sql.ResultSet;
import java.sql.SQLException;

public class MyMapper implements RowMapper<Person> {
	
	@Override
	public Person mapRow(ResultSet rs, int rowNum) throws SQLException {
		int id = rs.getInt("id");
		String name = rs.getString("name");
		return new Person(id, name);
	}
}
